package com.endurance.controller;

import com.alibaba.csp.sentinel.annotation.SentinelResource;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: sunlin
 * @Date: 2024-04-29 14:29
 * @Version: 1.0
 * @Description:
 */
@RestController
public class ProducerController {

    @GetMapping("/producer")
    // 给资源起别名，最好使用这种方式设置资源名称，解耦合
    @SentinelResource("producer")
    public String producer() {
        return "producer";
    }

}
